.class public Lcom/uucun/adsdk/UUAppConnect;
.super Ljava/lang/Object;


# static fields
.field public static final SDK_VERSION:Ljava/lang/String; = "1.0.0"

.field private static appConnect:Lcom/uucun/adsdk/UUAppConnect;


# instance fields
.field private context:Landroid/content/Context;

.field private initSdk:Lcom/uucun/adsdk/d;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    const/4 v0, 0x0

    sput-object v0, Lcom/uucun/adsdk/UUAppConnect;->appConnect:Lcom/uucun/adsdk/UUAppConnect;

    return-void
.end method

.method private constructor <init>(Landroid/app/Activity;Ljava/lang/String;Ljava/lang/String;)V
    .locals 2

    const/4 v0, 0x0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput-object v0, p0, Lcom/uucun/adsdk/UUAppConnect;->initSdk:Lcom/uucun/adsdk/d;

    iput-object v0, p0, Lcom/uucun/adsdk/UUAppConnect;->context:Landroid/content/Context;

    if-eqz p2, :cond_0

    invoke-static {p2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_1

    :cond_0
    new-instance v0, Ljava/lang/RuntimeException;

    const-string v1, "App Key \u4e0d\u80fd\u4e3a\u7a7a."

    invoke-direct {v0, v1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_1
    if-nez p3, :cond_2

    const-string v0, ""

    :goto_0
    iput-object p1, p0, Lcom/uucun/adsdk/UUAppConnect;->context:Landroid/content/Context;

    new-instance v1, Lcom/uucun/adsdk/d;

    invoke-direct {v1, p1, p2, v0}, Lcom/uucun/adsdk/d;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V

    iput-object v1, p0, Lcom/uucun/adsdk/UUAppConnect;->initSdk:Lcom/uucun/adsdk/d;

    return-void

    :cond_2
    move-object v0, p3

    goto :goto_0
.end method

.method private constructor <init>(Landroid/content/Context;)V
    .locals 1

    const/4 v0, 0x0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput-object v0, p0, Lcom/uucun/adsdk/UUAppConnect;->initSdk:Lcom/uucun/adsdk/d;

    iput-object v0, p0, Lcom/uucun/adsdk/UUAppConnect;->context:Landroid/content/Context;

    iput-object p1, p0, Lcom/uucun/adsdk/UUAppConnect;->context:Landroid/content/Context;

    new-instance v0, Lcom/uucun/adsdk/d;

    invoke-direct {v0, p1}, Lcom/uucun/adsdk/d;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/uucun/adsdk/UUAppConnect;->initSdk:Lcom/uucun/adsdk/d;

    return-void
.end method

.method public static getInstance(Landroid/content/Context;)Lcom/uucun/adsdk/UUAppConnect;
    .locals 1

    sget-object v0, Lcom/uucun/adsdk/UUAppConnect;->appConnect:Lcom/uucun/adsdk/UUAppConnect;

    if-nez v0, :cond_0

    new-instance v0, Lcom/uucun/adsdk/UUAppConnect;

    invoke-direct {v0, p0}, Lcom/uucun/adsdk/UUAppConnect;-><init>(Landroid/content/Context;)V

    sput-object v0, Lcom/uucun/adsdk/UUAppConnect;->appConnect:Lcom/uucun/adsdk/UUAppConnect;

    :cond_0
    sget-object v0, Lcom/uucun/adsdk/UUAppConnect;->appConnect:Lcom/uucun/adsdk/UUAppConnect;

    return-object v0
.end method

.method public static showToast(Ljava/lang/String;Landroid/content/Context;)V
    .locals 2

    new-instance v0, Landroid/os/Handler;

    invoke-direct {v0}, Landroid/os/Handler;-><init>()V

    new-instance v1, Lcom/uucun/adsdk/a;

    invoke-direct {v1, p1, p0}, Lcom/uucun/adsdk/a;-><init>(Landroid/content/Context;Ljava/lang/String;)V

    invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    return-void
.end method


# virtual methods
.method public detectUpdate()V
    .locals 2

    iget-object v0, p0, Lcom/uucun/adsdk/UUAppConnect;->initSdk:Lcom/uucun/adsdk/d;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/uucun/adsdk/UUAppConnect;->initSdk:Lcom/uucun/adsdk/d;

    iget-object v1, p0, Lcom/uucun/adsdk/UUAppConnect;->context:Landroid/content/Context;

    invoke-virtual {v0, v1}, Lcom/uucun/adsdk/d;->e(Landroid/content/Context;)V

    :cond_0
    return-void
.end method

.method public exitSdk()V
    .locals 5

    const/4 v4, 0x0

    iget-object v0, p0, Lcom/uucun/adsdk/UUAppConnect;->context:Landroid/content/Context;

    invoke-static {v0}, Lcom/uucun/adsdk/b/a;->a(Landroid/content/Context;)Lcom/uucun/adsdk/b/a;

    move-result-object v0

    const-string v1, "last_end_time"

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v2

    invoke-virtual {v0, v1, v2, v3}, Lcom/uucun/adsdk/b/a;->a(Ljava/lang/String;J)V

    invoke-virtual {v0}, Lcom/uucun/adsdk/b/a;->a()V

    sput-object v4, Lcom/uucun/adsdk/UUAppConnect;->appConnect:Lcom/uucun/adsdk/UUAppConnect;

    iget-object v0, p0, Lcom/uucun/adsdk/UUAppConnect;->initSdk:Lcom/uucun/adsdk/d;

    iget-object v1, p0, Lcom/uucun/adsdk/UUAppConnect;->context:Landroid/content/Context;

    invoke-virtual {v0, v1}, Lcom/uucun/adsdk/d;->d(Landroid/content/Context;)V

    invoke-static {}, Lcom/uucun/adsdk/a/b;->a()Lcom/uucun/adsdk/a/b;

    move-result-object v0

    invoke-virtual {v0}, Lcom/uucun/adsdk/a/b;->b()V

    iput-object v4, p0, Lcom/uucun/adsdk/UUAppConnect;->initSdk:Lcom/uucun/adsdk/d;

    invoke-static {}, Ljava/lang/System;->gc()V

    return-void
.end method

.method public getPoints(Lcom/uucun/adsdk/UpdatePointListener;)V
    .locals 2

    iget-object v0, p0, Lcom/uucun/adsdk/UUAppConnect;->initSdk:Lcom/uucun/adsdk/d;

    iget-object v1, p0, Lcom/uucun/adsdk/UUAppConnect;->context:Landroid/content/Context;

    invoke-virtual {v0, p1, v1}, Lcom/uucun/adsdk/d;->a(Lcom/uucun/adsdk/UpdatePointListener;Landroid/content/Context;)V

    return-void
.end method

.method public initSdk()V
    .locals 2

    iget-object v0, p0, Lcom/uucun/adsdk/UUAppConnect;->initSdk:Lcom/uucun/adsdk/d;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/uucun/adsdk/UUAppConnect;->initSdk:Lcom/uucun/adsdk/d;

    iget-object v1, p0, Lcom/uucun/adsdk/UUAppConnect;->context:Landroid/content/Context;

    invoke-virtual {v0, v1}, Lcom/uucun/adsdk/d;->a(Landroid/content/Context;)V

    :cond_0
    return-void
.end method

.method public showBanner(Landroid/widget/LinearLayout;I)V
    .locals 2

    new-instance v0, Lcom/uucun/adsdk/view/l;

    iget-object v1, p0, Lcom/uucun/adsdk/UUAppConnect;->context:Landroid/content/Context;

    invoke-direct {v0, v1, p1}, Lcom/uucun/adsdk/view/l;-><init>(Landroid/content/Context;Landroid/widget/LinearLayout;)V

    invoke-virtual {v0, p2}, Lcom/uucun/adsdk/view/l;->a(I)V

    return-void
.end method

.method public showOffers()V
    .locals 3

    new-instance v0, Landroid/content/Intent;

    iget-object v1, p0, Lcom/uucun/adsdk/UUAppConnect;->context:Landroid/content/Context;

    const-class v2, Lcom/uucun/adsdk/OfferActivity;

    invoke-direct {v0, v1, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const/high16 v1, 0x1000

    invoke-virtual {v0, v1}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

    iget-object v1, p0, Lcom/uucun/adsdk/UUAppConnect;->context:Landroid/content/Context;

    invoke-virtual {v1, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    return-void
.end method

.method public spendPoints(ILcom/uucun/adsdk/UpdatePointListener;)V
    .locals 3

    iget-object v0, p0, Lcom/uucun/adsdk/UUAppConnect;->initSdk:Lcom/uucun/adsdk/d;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/uucun/adsdk/UUAppConnect;->initSdk:Lcom/uucun/adsdk/d;

    int-to-float v1, p1

    iget-object v2, p0, Lcom/uucun/adsdk/UUAppConnect;->context:Landroid/content/Context;

    invoke-virtual {v0, v1, p2, v2}, Lcom/uucun/adsdk/d;->a(FLcom/uucun/adsdk/UpdatePointListener;Landroid/content/Context;)V

    :cond_0
    return-void
.end method

.method public startupCatchBugs()V
    .locals 2

    iget-object v0, p0, Lcom/uucun/adsdk/UUAppConnect;->initSdk:Lcom/uucun/adsdk/d;

    iget-object v1, p0, Lcom/uucun/adsdk/UUAppConnect;->context:Landroid/content/Context;

    invoke-virtual {v0, v1}, Lcom/uucun/adsdk/d;->f(Landroid/content/Context;)V

    return-void
.end method
